package com.ccp.dev.system.model;

import com.ccp.dev.core.basic.model.BaseModel;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * 角色资源映射 Model对象
 * @author y
 */
public class RoleResources extends BaseModel {
	/**
	 * 角色资源Id
	 */
	protected String roleResId;
	/**
	 * 角色id
	 */
	protected String roleId;
	/**
	 * 资源主键
	 */
	protected String resId;
	/**
	 * 系统id
	 */
	protected String systemId;

	public String getRoleResId() {
		return roleResId;
	}

	public void setRoleResId(String roleResId) {
		this.roleResId = roleResId;
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getResId() {
		return resId;
	}

	public void setResId(String resId) {
		this.resId = resId;
	}

	public String getSystemId() {
		return systemId;
	}

	public void setSystemId(String systemId) {
		this.systemId = systemId;
	}

	/**
	 * @see Object#equals(Object)
	 */
	@Override
	public boolean equals(Object object)
	{
		if (!(object instanceof RoleResources))
		{
			return false;
		}
		RoleResources rhs = (RoleResources) object;
		return new EqualsBuilder()
		.append(this.roleResId, rhs.roleResId)
		.append(this.roleId, rhs.roleId)
		.append(this.resId, rhs.resId)
		.isEquals();
	}

	/**
	 * @see Object#hashCode()
	 */
	@Override
	public int hashCode()
	{
		return new HashCodeBuilder(-82280557, -700257973)
		.append(this.roleResId)
		.append(this.roleId)
		.append(this.resId)
		.toHashCode();
	}

	/**
	 * @see Object#toString()
	 */
	@Override
	public String toString() 
	{
		return new ToStringBuilder(this)
		.append("roleResId", this.roleResId) 
		.append("roleId", this.roleId) 
		.append("resId", this.resId) 
		.toString();
	}
}